package org.example.casemodule.vo;

import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Data
public class RatingVO {
    /**
     * "lawyerId": 20001,
     *     "averageRating": 4.8,
     *     "ratingDistribution": {
     *       "5": 18,
     *       "4": 5,
     *       "3": 1,
     *       "2": 0,
     *       "1": 0
     *     },
     *     "total": 24,
     *     "reviews": [
     *       {
     *         "reviewId": "REV001",
     *         "caseId": "CASE20240415001",
     *         "caseType": "LABOR_DISPUTE",
     *         "rating": 5,
     *         "comment": "非常专业的律师，帮助很大",
     *         "date": "2024-04-15T14:30:00Z",
     *         "userInfo": {
     *           "userId": 10001,
     *           "name": "张*"
     *         }
     *       }
     *     ]
     */
    private Long lawyerId;
    private BigDecimal averageRating;
    private Map<String, Integer> ratingDistribution;
    private Long total;
    private List<Review> reviews;

    @Data
    public static class Review {
        private Long reviewId;
        private Long caseId;
        private String caseName;
        private Integer rating;
        private String comment;
        private Date date;
        private UserInfo userInfo;
    }
    @Data
    public static class UserInfo {
        private Long userId;
        private String name;
    }
}
